home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 005 / epistat.arc / PRINTDOC < prev    next >
Encoding:
Text File  |  1983-10-18  |  22.4 KB  |  591 lines

  1.                                                                  1
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                  EPISTAT
  22.                            Statistical Package
  23.                       for the IBM Personal Computer
  24.  
  25.                            Version 2.1, 1983
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                       Written by:
  32.    
  33.                          Tracy L. Gustafson, M.D.
  34.  
  35.                       
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                                                  2
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                               INTRODUCTION
  74.  
  75.    
  76.         EPISTAT is a collection of programs written in BASICA for 
  77.    statistical analysis of small to medium-sized data samples ( < 1000
  78.    observations per sample and < 28 data samples per file).  It includes
  79.    programs to ENTER, APPEND, and EDIT data, as well as perform several
  80.    kinds of data TRANSFORMATIONS.  The datafiles can be PRINTED, GRAPHED,
  81.    or SAVED to disk.  The 21 programs in EPISTAT can also perform 34
  82.    common statistical tests or functions.
  83.  
  84.  
  85.         The programs are intended to be as self-explanatory and user-
  86.    friendly as possible.  All questions can be answered with a number,
  87.    a "Y" for yes, or an "N" for no.  A thorough study of this guide is not
  88.    necessary before using the programs.  On the other hand, neither the
  89.    programs nor this manual purport to TEACH the proper use or interpre-
  90.    tation of statistics.  Rather, some familiarity with the kinds of
  91.    data required and the underlying assumptions appropriate to each
  92.    statistical test is assumed.
  93.  
  94.  
  95.         One will note that some of the programs emphasize epidemiologic
  96.    and medical applications.  Despite the wording of various program
  97.    questions or statements, these test also apply to many other types of
  98.    data.  For further explanations of tests, refer to:
  99.  
  100.    1.  Colton, Theodore. Statistics in Medicine. Little, Brown and Co.
  101.          Boston, 1974.
  102.    2.  Fleiss, Joseph.  Statistical Methods for Rates and Proportions.
  103.          John Wiley and Sons. New York, 1973.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.    CAVEAT:
  112.         These programs have been tested extensively, but I cannot 
  113.    guarantee that they will work correctly with every possible data set
  114.    or in every possible situation.  Incorrect results are usually due
  115.    to errors in the format or type of data entered.  If you believe you
  116.    have discovered a problem in the programs, please write me.  I intend
  117.    to fix any bugs that are brought to my attention.
  118.         It is good practice to regularly compare the results obtained
  119.    by programs in EPISTAT with results obtained by your previous method
  120.    of calculation until you are familiar with each program.  ANY
  121.    unexpected result should be questionned and double-checked by
  122.    reference to tables or another method of calculation.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                                                                   3
  134.  
  135.  
  136.  
  137.                         INDEX TO EPISTAT
  138.    The following statistical tests and functions are available:
  139.                                     
  140.    TEST or FUNCTION                               PROGRAM NAME
  141.    ----------------                               ------------
  142.    Analysis of variance (1-way)......................ANOVA
  143.    Analysis of variance (2-way)......................ANOVA
  144.    Bayes' theorem:
  145.        False positive and false negative tests.......BAYES
  146.        Probability of event given positive test......BAYES
  147.    Binomial distribution.............................BINOMIAL
  148.    Chi-square distribution...........................CHISQR
  149.    Chi-square test...................................CHISQR
  150.    Correlation coefficient (Pearson's)...............CORRELAT
  151.    F distribution....................................ANOVA
  152.    Fisher's exact test...............................FISHERS
  153.    Linear regression analysis........................LNREGRES
  154.    Mantel-Haenszel Chi-square test...................MHCHISQR
  155.    Mantel-Haenszel for multiple controls.............MHCHIMLT
  156.    McNemar's test....................................MCNEMAR
  157.    Mean..............................................DATA-ONE
  158.    Median............................................DATA-ONE
  159.    Normal distribution...............................NORMAL
  160.    Percent of values in given range..................NORMAL
  161.    Poisson distribution..............................POISSON
  162.    Random sample generator:
  163.       Select sample from a population................RANDOMIZ
  164.       Assign unpaired cases and controls.............RANDOMIZ
  165.       Assign paired cases and controls...............RANDOMIZ
  166.    Rank correlation (Spearman's).....................RANKTEST
  167.    Rank sum test.....................................RANKTEST
  168.    Rates adjusted, direct method.....................RATEADJ
  169.    Rates adjusted, indirect method...................RATEADJ
  170.    Sample size calculations:
  171.       For estimating population rate.................SAMPLSIZ
  172.       For unpaired case-control study................SAMPLSIZ
  173.       For paired case-control study..................SAMPLSIZ
  174.    Signed rank test..................................RANKTEST
  175.    Standard deviation................................DATA-ONE
  176.    Student's T-test (independent samples)............T-TEST
  177.    Student's T-test (paired samples).................T-TEST
  178.    T distribution....................................T-TEST
  179.  
  180.  
  181.    In addition, the following data-handling capabilities are available:
  182.  
  183.    DATA MANIPULATION                               PROGRAM NAME
  184.    -----------------                               ------------
  185.    Determine best test and program names.............EPISTAT
  186.    Enter, append and edit data.......................DATA-ONE
  187.    Graph data in histogram...........................HISTOGRM
  188.    Print data (sorted or as entered).................DATA-ONE
  189.    Perform data transformations......................LNREGRES
  190.    Save data to disk file............................DATA-ONE
  191.    Transfer data samples from one file to another....FILETRAN
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                                                                    4
  200.  
  201.  
  202.  
  203.  
  204.                        SYSTEM REQUIREMENTS FOR EPISTAT
  205.  
  206.                MINIMUM                               OPTIMAL
  207.          IBM PC with 64K RAM                  IBM PC with 96K RAM
  208.          One 160K disk drive                  Two disk drives
  209.          Monochrome monitor                   Color graphics adapter
  210.          BASICA                               Hi-res color monitor
  211.                                               BASICA
  212.                                               IBM or Epson printer
  213.                                                   with graphics
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.                   EPISTAT - OVERALL PROGRAM DESCRIPTION
  223.    
  224.  
  225.         All calculations in EPISTAT are performed using single precision.
  226.    Although it may first appear that double precision would be more 
  227.    appropriate for statistical tests, "double" precision makes little or
  228.    no real improvement in precision in these programs.  Many of the
  229.    algorithms used to evaluate p values use trigonometric functions which
  230.    are calculated in single precision, anyway.  Specifying double
  231.    precision only serves to considerably slow the calculations.  For
  232.    best results, data entries should be numbers between 1E+7 and 1E-7.
  233.    Larger or smaller numbers should be multiplied by an appropriate
  234.    power of 10 before entry and analysis in EPISTAT.
  235.  
  236.  
  237.         All EPISTAT programs are written so that as much pertinent
  238.    information about the test as possible can fit on the final screen.
  239.    This feature allows a summary printed copy to be produced simply by
  240.    pressing <Shift-PrtSc>.  This will work any time there is a pause in
  241.    the program display.  Three programs, "DATA-ONE", "HISTOGRM", and 
  242.    "RANDOMIZ", produce printed reports without using <Shift-PrtSC>.  In
  243.    these, simply follow program instructions to route output to your
  244.    printer.
  245.    
  246.  
  247.         EPISTAT is the introductory program in the EPISTAT package.
  248.    DATA-ONE is the major data entry, editing, and printing program.
  249.    Most of the programs in EPISTAT can evaluate data entered and saved
  250.    using DATA-ONE.  Many of the programs can, in addition, evaluate
  251.    summary data entered without first using DATA-ONE.  The programs
  252.    marked with a star (*) in the individual descriptions that follow
  253.    can evaluate raw data SAVED to disk with DATA-ONE.  Non-starred 
  254.    programs provide their own data entry routines.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                                                                   5
  266.  
  267.  
  268.                        INDIVIDUAL PROGRAM DESCRIPTIONS
  269.  
  270.  
  271.     (1)                        "EPISTAT"
  272.         This introductory program lists the available programs and aids
  273.    the user in selecting the best statistical test for his or her data.
  274.  
  275.     (2)                       "DATA-ONE"
  276.  
  277.    DATA ENTRY:
  278.         This is the central data entry program for the EPISTAT package.
  279.    Initial data entry is accomplished by selecting option 1 and following
  280.    the instructions to name each sample.  Type in your numbers and
  281.    press <Enter> twice after each entry.  The maximum number of samples
  282.    (S) in a datafile is 28 with a color and 7 with a monochrome adapter.
  283.    The maximum number of records in each sample is 2000/S.  A blank record
  284.    can be entered if no data is available for a given cell (or if 2 samples
  285.    with different numbers of observations are being entered) by pressing
  286.    <Enter>, then Key F2.  To exit the data entry mode, simply press <Enter>
  287.    then key F10 following the last record.  The mean, median and standard
  288.    deviation are then calculated and displayed automatically.
  289.         When you return to the main menu, choose option 5 (see below) to
  290.    save your datafile to disk for future modification or use by other
  291.    programs in the EPISTAT package.
  292.         Although all entries in a datafile are treated as numbers by 
  293.    DATA-ONE, it is possible to enter character strings in a record.  Such
  294.    strings will be treated as zeros in all calculations.  Nevertheless,
  295.    when entering several samples, it often improves data readability to
  296.    use the "Sample #1" column for names or identifying information about
  297.    each ROW of data.  Thus, DATA-ONE allows one to specify a name for
  298.    each column and row in the datafile.
  299.  
  300.    DATA MODIFICATION:  
  301.         Option 2, APPEND, allows one to add more observations to a sample
  302.    after initial data entry has been terminated.  Option 3, EDIT, allows
  303.    one to delete or replace incorrect data entries.  Both of these options
  304.    can be used to modify a datafile that has been loaded from disk.  Of
  305.    course, if you modify a datafile in any way, you will want to SAVE the
  306.    modified datafile to disk again using Option 5.
  307.    
  308.    PRINTING DATA:
  309.         To view or review a datafile, a printout to screen or printer can
  310.    be obtained, Option 4.  To print a datafile exactly as it was keyed in,
  311.    request the printout in INPUT order.  DATA-ONE has the additional
  312.    capability to present the data SORTED in the order of any selected
  313.    sample.  Remember, only numeric data is sorted by DATA-ONE, so it will
  314.    not alphabetize a character field.  Further, sorted data will print
  315.    only NON-BLANK records in the selected sort sample.
  316.  
  317.    SAVING DATAFILES and LOADING DATAFILES:
  318.         Option 5, SAVE datafile, writes your data to disk in a sequential
  319.    file for later editing, review, or use by another program.  DATA MUST
  320.    BE SAVED TO DISK before it can be used by other programs in EPISTAT.
  321.    The name chosen for each DATAFILE must conform to the rules for IBM
  322.    disk file names (see p. 3-36 in BASIC manual).  If you have a 2-drive
  323.    system, you will probably want put the EPISTAT disk in drive A: and
  324.    SAVE datafiles on drive B.  To do so, simply precede each datafile 
  325.    name with B: (e.g. B:TESTDATA).  Note that file names entered in
  326.    DATA-ONE do not need to be enclosed in quotation marks.
  327.      
  328.  
  329.  
  330.  
  331.                                                                   6
  332.  
  333.  
  334.  
  335.  
  336.     (3)                        "ANOVA" *
  337.  
  338.         Provides ONE-WAY and TWO-WAY analysis of variance.  ONE-WAY ANOVA
  339.    compares the means of 3 or more samples.  TWO-WAY ANOVA compares the
  340.    combined effects of 2 variables on a third (ROW and COLUMN effects).
  341.    All samples in TWO-WAY ANOVA must have the same number of elements.
  342.    The program also provides for evaluation of a known F value.
  343.  
  344.     (4)                        "BAYES"
  345.  
  346.         Using Bayes' theorem, this program calculates the rates of false
  347.    positive and false negative tests given differenct sensitivities and
  348.    specificities and disease incidences.  Using the formula in a different
  349.    way, it can also calculate the prior probability of several diseases
  350.    given a positive test.
  351.  
  352.     (5)                       "BINOMIAL"
  353.  
  354.         The binomial distribution allows calculation of the probability
  355.    of a observed number compared to the expected.  It assumes the variable
  356.    is dichotomous and has an equal probability of occurring in each trial.
  357.    This program calculates the ONE-TAILED probability of the entered
  358.    number and all more extreme situations.  For example, in the case of
  359.    2 heads in 10 tosses of a coin, the ONE-TAILED probability includes the
  360.    sum of the probabilities for 0,1 and 2 heads out of 10 tosses.
  361.  
  362.     (6)                        "CHISQR"
  363.  
  364.         The Chi-square test evaluates either a table of data or a known
  365.    chi-square value.  2 by 2 tables are automatically evaluated using
  366.    Yates' correction.  Tables larger than 15 by 10 cells will not fit
  367.    on a single screen.
  368.  
  369.     (7)                       "CORRELAT" *
  370.  
  371.         Pearson's correlation coefficient assesses the correlation 
  372.    between paired samples.  The probability of a given R value is
  373.    evaluated using the T distribution.
  374.  
  375.     (8)                       "FISHERS"
  376.  
  377.         Fisher's exact test evaluates 2 by 2 tables of discrete variables.
  378.    It is particularly valuable when the Chi-square test cannot be used
  379.    because the expected value for a cell is < 5.  However, this program
  380.    can evaluate some tables where A+B+C+D > 200.
  381.  
  382.     (9)                       "HISTOGRM" *
  383.  
  384.         The histogram program graphs a data sample according to user
  385.    specifications on the high resolution graphics screen.  This screen
  386.    image can be printed on an IBM or Epson printer with graphics features.
  387.    To obtain a printed copy, simply press key F10 after the graph is
  388.    displayed on screen.  (Printing takes several minutes).  If you do not
  389.    want a printed copy, press key F1 to return to the program.
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                                                                    7
  398.  
  399.  
  400.  
  401.     (10)                      "LNREGRES" *
  402.    
  403.         Linear regression analysis calculates the least-squares regression
  404.    line for paired samples.  It then uses the T distribution to determine
  405.    if the calculated slope is significantly different than zero.  The
  406.    program also allows the user to specify several types of data
  407.    transformations prior to regression analysis.  Transformed data
  408.    samples can be saved to disk for future use (or printout).
  409.  
  410.     (11)                      "MHCHISQR"
  411.  
  412.         The Mantel-Haenszel Chi-square test evaluates the relationship
  413.    between two discrete variables while controlling for the effect of
  414.    a third variable.
  415.  
  416.     (12)                      "MHCHIMLT" *
  417.  
  418.         The Mantel-Haenszel Chi-square test for multiple controls compares
  419.    one sample (the case sample) to 2 or more matched samples (control
  420.    samples).  The program can evaluate raw data input using DATA-ONE, if
  421.    the data is entered as "1" for factor present, and "0" for factor
  422.    absent in each case and control sample record.  The program will also
  423.    evaluate summary data entered per program instructions.
  424.  
  425.     (13)                      "MCNEMAR"
  426.  
  427.         McNemar's test, or the paired Chi-square test, evaluates 2 by 2
  428.    tables of paired discrete variables.  It compares discordant pairs
  429.    (using Yates' correction) and calculates a probability that compares
  430.    very well to the results of the binomial distribution.
  431.  
  432.     (14)                       "NORMAL" *
  433.  
  434.         The normal distribution has innumerable uses in statistics.  This
  435.    program specifically addresses three situations:  First, it compares
  436.    a sample mean to a population mean.  Second, it calculates the 
  437.    proportion of samples that would be expected to fall in any given 
  438.    range under the normal curve.  Third, it calculates the probability
  439.    associated with any given value of z.
  440.  
  441.     (15)                      "POISSON"
  442.  
  443.         The Poisson distribution applies to dichotomous variables when
  444.    the number of successes can be counted, but the number of failures
  445.    cannot.  It can also be used to approximate the binomial distribution
  446.    when the number of trials is large (>100) and the expected rate is
  447.    small (<5%).  This program, like the Binomial program, calculates a
  448.    ONE-TAILED probability.
  449.      
  450.     (16)                      "RANDOMIZ"
  451.  
  452.         This random sample generator aids in the selection of random
  453.    samples for several purposes.  It can provide a random subset of a 
  454.    larger population, or it can assign cases randomly to independent or
  455.    paired groups for case-control studies.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                                                                 8
  464.  
  465.  
  466.  
  467.  
  468.     (17)                      "RANKTEST" *
  469.  
  470.         Three non-parametric tests of significance are performed by this
  471.    program.  They are appropriate for any sample which is clearly NOT
  472.    normally distributed.  They also specifically apply when quantitative
  473.    variables are not available but qualitative ranks are.  The RANK SUM
  474.    TEST compares 2 independent samples.  The SIGNED RANK TEST compares the
  475.    medians of paired samples.  Spearman's RANK CORRELATION calculates a
  476.    correlation coefficient for paired samples.  For the first two tests,
  477.    the program calculates a TWO-TAILED exact probability associated with
  478.    the various rank sums.  Note that for samples larger than 20
  479.    observations, the latter calculation can take several minutes.
  480.  
  481.     (18)                      "RATEADJ" *
  482.  
  483.         The rates adjustment program will adjust sample rates by either
  484.    the direct or indirect methods.  For DIRECT method adjustment, the
  485.    datafile entered in DATA-ONE must include the study sample rates and
  486.    the standard population figures.  For INDIRECT method adjustment, the
  487.    datafile used must include the study population figures and the
  488.    standard population rates.  After INDIRECT rate adjustment, the 
  489.    program will evaluate the probability of the observed number of cases
  490.    using the Poisson distribution for small numbers, or the Chi-square
  491.    distribution for large observed numbers.
  492.  
  493.     (19)                       "SAMPLSIZ" *
  494.  
  495.         The sample size program calculates the approximate sample sizes
  496.    required to achieve statistical significance given certain specified
  497.    levels of certainty.  The following formulas are used:
  498.   
  499.    For a survey:                                                  
  500.                      N = [ z(a)*SQR(pi*(1-pi)) / d ] squared
  501.           If N > 10% of entire population, then N' = N / (1+N/TP) .
  502.  
  503.    For a paired case-control study:
  504.  
  505.     N = [(z(a)*SQR(pi*(1-pi)) - z(b)*SQR(pi*(1-pi))) / (PT-pi) ] squared
  506.  
  507.    For an unpaired case-control study:
  508.  
  509.        [(z(a)*SQR(2*pi*(1-pi)) - z(b)*SQR(PT*(1-PT) + PC*(1-PC))]
  510.   N = [-----------------------------------------------------------] squared
  511.                                (PT - PC)  
  512.  
  513.  
  514.     (20)                        "T-TEST" *
  515.  
  516.         The Student's T-Test compares the means of two samples.  The
  517.    program provides both the paired and unpaired T-Test calculations.
  518.    The program will also evaluate a known T value.
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                                                                  9
  530.  
  531.  
  532.  
  533.     (21)                       "FILETRAN" *
  534.  
  535.         On occassion you may find that you want to compare 2 samples
  536.    that are already entered in separate DATAFILES.  Or you may have
  537.    standard population figures in one datafile and sample rates to be
  538.    adjusted in a different datafile.  EPISTAT programs, however, only
  539.    allow analysis of samples that are in a SINGLE DATAFILE.  Rather than
  540.    reenter one or both samples from keyboard, this file transfer program
  541.    allows you to add a sample from DATAFILE #1 to any other DATAFILE #2.
  542.    You may also create an entirely new datafile by selecting one sample
  543.    from DATAFILE #1 and another from DATAFILE #2.  Yet another option
  544.    in FILETRAN is the ability to combine 2 samples into a single one by
  545.    APPENDING one to the other.  This utility program should make reentry
  546.    of data unnecessary, regardless of the number of tests applied to it.
  547.  
  548.  
  549.  
  550.                                  NOTICE
  551.  
  552.    ---------------------------------------------------------------------
  553.    Users may copy EPISTAT and distribute it to others on the following
  554.    conditions:
  555.      1.  The programs are not modified in any way.
  556.      2.  Individual programs are not distributed separately.
  557.      3.  No fee is charged for copying or distribution.
  558.    ---------------------------------------------------------------------
  559.  
  560.  
  561.         The concept of user-supported software is based on three
  562.    principles:
  563.  
  564.      1.  The value and utility of a software (programs) are best assessed
  565.          by each user on his or her own system with his or her own data.
  566.          Only after using a program can one determine whether it serves
  567.          one's personal applications, needs, and tastes.
  568.    
  569.      2.  The creation of independent personal computer software requires
  570.          a substantial commitment of time and effort.  Rather than
  571.          duplicate this effort time after time, the computing community
  572.          can and should support individual creative efforts.
  573.  
  574.      3.  The copying and networking of programs should be encouraged,
  575.          not restricted.  The entire computing community benefits when
  576.          the burden of copy-protection is removed.
  577.                                
  578.  
  579.         If after using EPISTAT, you find it of value, your contribution
  580.             in any amount will be appreciated ( $20 suggested ).
  581.  
  582.    Send contributions to:
  583.  
  584.                           Tracy L. Gustafson, M.D.
  585.                           1705 Gattis School Road
  586.                           Round Rock, Texas    78664
  587.  
  588.  
  589.  
  590.                           Thank you, and good luck.
  591.